package idv.cjcat.stardust.common.math;

import org.w3c.dom.Element;

import idv.cjcat.stardust.common.StardustElement;
import idv.cjcat.stardust.common.xml.XMLElement;
	
	/**
	 * This class generates a random number.
	 */
	public class Random extends StardustElement {
		
		/**
		 * [Abstract Method] Generates a random number.
		 * @return
		 */
		public double random() {
			//abstract method
			return 0.5;
		}
		
		/**
		 * [Abstract Method] Sets the random number's range.
		 * @param	lowerBound
		 * @param	upperBound
		 */
		public void setRange(double lowerBound, double upperBound) {
			//abstract method
		}
		
		/**
		 * [Abstract Method] Returns the random number's range.
		 * @return
		 */
		public double[] getRange() {
			//abstract method
			double[] range = {0.5, 0.5};
			return range;
		}
		
		
		//XML
		//------------------------------------------------------------------------------------------------
		
		@Override
		public String getXMLTagName() {
			return "Random";
		}
		
		@Override 
		public Element getElementTypeXMLTag() {
			return XMLElement.document.createElement("randoms");
		}
		
		//------------------------------------------------------------------------------------------------
		//end of XML
	}
